document.addEventListener('plusready',function(){
	showWating();
	$.ajax({
		type:"get",
		url:apiRoot+"?m=home&c=studio&a=studioDoctor",
		success : function(data){
			console.log(JSON.stringify(data));
			var melist = $.parseJSON(data);
			plus.storage.setItem('melist',data);
			var list = '';
			$.each(melist, function(k,v) {   
				list += '<div class="famous-doctor-lists" data-id="'+v.aid+'">'+
							'<div class="mui-table-view table-view-cell famous-doctor-icon">'+
								'<div><img src="'+webRoot+v.pic+'"/></div>'+
								'<div>'+
									'<li class="font-15">'+v.title+'</li>'+
								'</div>'+
							'</div>'+
							'<div class="table-view-cell background mui-h5 famous-doctor-list">'+
								'<h5 class="color-000">工作室介绍：</h5>'+
								'<span>'+(v.introduce).substring(0,500)+'</span>'+
							'</div>'+
						'</div>';
			});
			$('.medicine').html(list);
			plus.nativeUI.closeWaiting();
			$('.famous-doctor-lists').on('click',function(){
				goNewPage('home-famous-doctor-house.html', {aid:$(this).attr('data-id')});
			})
		},
		error : function(e){
			var lists = plus.storage.getItem('melist');
			var melist = $.parseJSON(lists);
			var list = '';
			$.each(melist, function(k,v) {
				list += '<div class="famous-doctor-lists" data-id="'+v.aid+'">'+
							'<div class="mui-table-view table-view-cell famous-doctor-icon">'+
								'<div><img src="'+webRoot+v.pic+'"/></div>'+
								'<div>'+
									'<li class="font-15">'+v.title+'</li>'+
								'</div>'+
							'</div>'+
							'<div class="table-view-cell background mui-h5 famous-doctor-list">'+
								'<h5 class="color-000">工作室介绍：</h5>'+
								'<span>'+(v.introduce).substring(0,300)+'</span>'+
							'</div>'+
						'</div>';
			});
			$('.medicine').html(list);
			plus.nativeUI.closeWaiting();
			$('.famous-doctor-lists').on('click',function(){
				goNewPage('home-famous-doctor-house.html',{aid:$(this).attr('data-id')})
			})
			console.log(JSON.stringify(e));  
			errortoast();
		}
	});
},false)